/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace OpenGado.DATA.Entities
{
	/// <summary>
	/// Authorizations object for NHibernate mapped table 'authorizations'.
	/// </summary>
	[Serializable]
	public class Authorizations
	{
		#region Member Variables
		protected int _authid;
		protected string _authby;
		protected DateTime? _authdate;
		protected SystemUsers _systemusers;
		protected int _requestheaderid;
		protected IList<IssueItemHeader> _issueitemheader;
		#endregion
		#region Constructors
			
		public Authorizations() {}
					
		public Authorizations(string authby, DateTime? authdate, SystemUsers systemusers, int requestheaderid) 
		{
			this._authby= authby;
			this._authdate= authdate;
			this._systemusers= systemusers;
			this._requestheaderid= requestheaderid;
		}

		public Authorizations(SystemUsers systemusers, int requestheaderid)
		{
			this._systemusers= systemusers;
			this._requestheaderid= requestheaderid;
		}
		
		#endregion
		#region Public Properties
		public int Authid
		{
			get { return _authid; }
			set {_authid= value; }
		}
		public string AuthBy
		{
			get { return _authby; }
			set {_authby= value; }
		}
		public DateTime? AuthDate
		{
			get { return _authdate; }
			set {_authdate= value; }
		}
		public SystemUsers SystemUsers
		{
			get { return _systemusers; }
			set {_systemusers= value; }
		}
		public int RequestHeaderId
		{
			get { return _requestheaderid; }
			set {_requestheaderid= value; }
		}
		public IList<IssueItemHeader> IssueItemHeader
		{
			get { return _issueitemheader; }
			set {_issueitemheader= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Authorizations castObj = (Authorizations)obj;
			return ( castObj != null ) &&
			this._authid == castObj.Authid;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _authid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
